package com.woniuxy.project.campus.canteen.controller;


import com.woniuxy.project.campus.canteen.model.Region;
import com.woniuxy.project.campus.canteen.service.RegionService;

import com.woniuxy.project.campus.util.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 猫将军
 * @since 2025年02月17日
 */
@RestController
@RequestMapping("/region")
public class RegionController {

    @Resource
    private RegionService regionService;
    //查询食堂区域


    /**
     * 查询食堂区域
     * @return 食堂区域
     */
    @ApiOperation(value = "查询食堂区域")
    @GetMapping("/getRegion")
    public Result getRegion(){
        List<Region> regions = regionService.getRegion();
        return Result.success(regions);
    }
}

